<div class="nav-menu">
    <div class="tl">Todas as Categorias</div>
    <ul>
        <?php foreach($this->cat as $cat) { 
            $query = 'SELECT SQL_CACHE PRO_ID FROM PRODUTO WHERE CAT_ID = '.$cat['CAT_ID'].' and PRO_STA = 1';
            $pro = $this->db->fetchRow($query); 
        if(isset($pro['PRO_ID'])){
        ?>
        <li><a href="<?php echo $this->urlbase.'/'.$this->controller.'/index/cat/'.$cat['CAT_ID'];?>#st-lk-tp"><?php echo $cat['CAT_NOM']; ?></a></li>
        <?php } } ?>
    </ul>
</div>

<div class="cnt-conteudo">
    <?php if($this->escolar == 1){ ?>
    <ul class="lista_empresas">
        <?php foreach($this->emp as $emp){ 
        $img = glob($this->dir_emp.$emp['EMP_ID'].'.*');
        ?>
        <li>
            <a href="<?php echo $this->url(array('controller' => 'login', 'action' => 'cadastroescolar', 'emp_id' => $emp['EMP_ID'])); ?>">
                <img src="<?php echo $this->urlbase.'/'.$img[0]; ?>"  />
                <div class="titulo"><?php echo $emp['EMP_NOM']; ?></div>
            </a>
       </li>
        <?php } ?>
    </ul>
    <?php }else{ ?>
    <ul class="lista_produtos">
        
        <?php foreach($this->prod as $pro){ 
        $img = glob($this->dir_pro.$pro['PRO_ID'].'_*_hl.*');
        ?>
            <li>
                <a href="<?php echo $this->url(array('controller' => 'produto', 'action' => 'detalhe', 'id' => $pro['PRO_ID'])); ?>" >
                    <img src="<?php echo $this->urlbase.'/'.$img[0]; ?>"  />
                </a>
                <div class="des-prod">
                    <div class="content-info">
                        <a href="<?php echo $this->url(array('controller' => 'produto', 'action' => 'detalhe', 'id' => $pro['PRO_ID'])); ?>" class="comprar a<?php echo $this->segmento->CTS_ID ?>"></a>
                        <i style="margin-top: 2px;"><?php echo $this->segmento->CTS_NOM ?></i><br>
                        <strong><?php echo $pro['PRO_NOM'] ?></strong> 
                    </div>
                </div>
            </li>
        <?php } ?>
    </ul>
    <?php } ?>
    <?php if($this->escolar <> 1){ ?>
        <?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
    <?php } ?>
</div>